<link rel="stylesheet" type="text/css" href="/public/static/plugin/grid/jquery.grid.css" />
<style>
    .grid td[key="Action"] a { padding: 0 3px; margin: 0; border-left: 1px solid #333; }
    .grid td[key="Action"] a:first-child { border-left: 0; }
    .grid td[key="Action"] a[confirm] { color: red; }
</style>

<div class="grid box box-primary">
    <{foreach from=$grid.main item=item key=key}>
    <div id="<{$item.target}>" class="tablelist">加载中..</div>
    <{/foreach}>
</div>

<div style="height: 800px;"></div>

<script src="/public/static/plugin/grid/jquery.grid.js"></script>
<script src="/public/static/plugin/grid/jquery.grid.rule.js"></script>
<script>
    $(function(){
        <{foreach from=$grid.main item=item key=key}>
        $("#<{$item.target}>").grid('<{$item.config nofilter}>');
        <{/foreach}>

        $(".grid a[confirm]").click(function(){
            if(!window.confirm($(this).attr('confirm'))){
                return false;
            }
        });
    });
</script>